package com.qf.scheduledemo.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class ScheduleService {

    @Scheduled(cron = "0/5 * * * * ? ")
    public void schedule(){
        System.out.println("调度执行，时间为: " + LocalDateTime.now());
    }
}
